<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下载《英魂外传》分享赢好礼有机会获得iPhone X</title>
    <meta name="description" content="下载《英魂外传》分享赢好礼有机会获得iPhone X"/>
    <meta name="keywords" content="英魂外传"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no">
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <link rel="stylesheet" href="//cdn.66173.cn/mobile/css/yhwz_m.css?t={$smarty.now}">
    <link rel="stylesheet" href="longge.css">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="application/javascript" src="http://cdn.66173.cn/mobile/v2/scripts/activity_yh_m_func.js?t={$smarty.now}"></script>
</head>
<style>
</style>
<body class="home-page">
<div class="top_div">

</div>
<section class="sec sec1">
    <img class="img-top" src="//cdn.66173.cn/mobile/css/img/yhwz_m/bg_01.png?t=5" alt="">
</section>
<section class="background-img sec sec2" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_m/bg_02.jpg)">
    <div class="rotator clearfix">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info1.png" alt="" /></a></div>
                <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info2.png" alt="" /></a></div>
                <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info3.png" alt="" /></a></div>
                <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info4.png" alt="" /></a></div>
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination">
                <span class="swiper-pagination-bullet swiper-pagination-bullet-active" data-seq="0"></span>
                <span class="swiper-pagination-bullet" data-seq="1"></span>
                <span class="swiper-pagination-bullet" data-seq="2"></span>
                <span class="swiper-pagination-bullet" data-seq="3"></span>
            </div>
        </div>
    </div>
    <div class="article-zone">
        <ul class="article-tabs-zone">
            <li class="item active" data-type="latest">最新</li>
            <li class="item" data-type="activity">活动</li>
            <li class="item" data-type="news">新闻</li>
            <li class="item" data-type="notice">攻略</li>
        </ul>
        <div class="article-entry-cols">
            <ul class="article-entry-zone latest active">
                {foreach from=$new_article item=latest}
                <li class="item">
                    <a href="/detail/{$latest.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">攻略</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">古希腊神话怎会没有他《英雄...</span>
                            </span>
                        <span class="right">0322</span>
                    </a>
                </li>
                <li class="item">
                    <a href="/detail/{$latest.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">攻略</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">古希腊神话怎会没有他《英雄...</span>
                            </span>
                        <span class="right">0322</span>
                    </a>
                </li>
                <li class="item">
                    <a href="/detail/{$latest.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">攻略</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">古希腊神话怎会没有他《英雄...</span>
                            </span>
                        <span class="right">0322</span>
                    </a>
                </li>
                <li class="item">
                    <a href="/detail/{$latest.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">攻略</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">古希腊神话怎会没有他《英雄...</span>
                            </span>
                        <span class="right">0322</span>
                    </a>
                </li>
                {/foreach}
            </ul>
            <ul class="article-entry-zone activity">
                {foreach from=$activity_list item=activity}
                <li class="item">
                    <a href="/detail/{$activity.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">{$activity.name}</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">{$activity.title}</span>
                            </span>
                        <span class="right">{'m/d'|date:$activity.lastupdate}</span>
                    </a>
                </li>
                {/foreach}
            </ul>
            <ul class="article-entry-zone news">
                {foreach from=$news_list item=news}
                <li class="item">
                    <a href="/detail/{$news.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">{$news.name}</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">{$news.title}</span>
                            </span>
                        <span class="right">{'m/d'|date:$news.lastupdate}</span>
                    </a>
                </li>
                {/foreach}
            </ul>
            <ul class="article-entry-zone notice">
                {foreach from=$notice_list item=notice}
                <li class="item">
                    <a href="/detail/{$notice.id}" target="_blank">
                            <span class="left">
                                <span class="type-zone"><span class="type">{$notice.name}</span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
                                <span class="text-overflow title">{$notice.title}</span>
                            </span>
                        <span class="right">{'m/d'|date:$notice.lastupdate}</span>
                    </a>
                </li>
                {/foreach}
            </ul>
        </div>
    </div>
</section>
<section class="background-img sec sec3" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_m/bg_06.jpg)">
    <img class="img-title img-title-special" src="//cdn.66173.cn/mobile/css/img/yhwz_m/title_special.png" alt="">
</section>
<section class="background-img sec sec4" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_m/bg_03.jpg)">
    <img class="img-special" src="//cdn.66173.cn/mobile/css/img/yhwz_m/img_special1.png?t=3" alt="">
</section>
<div class="mask">
    <div class="pop-wrapper">
        <div class="background-img pop-bg pop-bg-large" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_m/bg_pop.png)">
            <a class="background-img close-pop" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_m/btn_pop_close.png)"></a>
            <div class="con">
                <div class="preorder-form-zone">
                    <img class="img-pop-title img-pop-title-gift" src="//cdn.66173.cn/mobile/css/img/yhwz_m/title_have_gift.png" alt="">
                    <div class="choose-wrapper">
                        <span class="desc">系统选择</span>
                        <img class="img-arrow-right" src="//cdn.66173.cn/mobile/css/img/yhwz_m/img_arrow_right.png" alt="">
                        <div class="choose-zone">
                            <div class="line android-line active"><input type="radio" id="android" name="w" value="1" checked="true"/><label for="android"><span class="background-img icon icon-android"></span><span class="text">Android</span></label></div>
                            <div class="line ios-line"><input type="radio" id="ios" name="w" value="2"/><label for="ios"><span class="background-img icon icon-ios"></span><span class="text">iOS</span></label></div>
                        </div>
                    </div>
                    <div class="pop-form-wrap">
                        <div class="pop-form-line">
                            <input type="tel" class="tel-input" placeholder="您的手机号..."/>
                        </div>
                        <div class="pop-form-line captcha-line">
                            <input type="number" class="captcha-input" placeholder="请输入验证码..."/>
                            <span class="captcha-tip to-get-captcha" style="background-image: url(//cdn.66173.cn/mobile/css/img/yhwz_pc/bg_captcha.png)">获取验证码</span>
                        </div>
                        <div class="btn-zone">
                            <img class="bt-btn go-preorder go-preorder-can" src="//cdn.66173.cn/mobile/css/img/yhwz_m/btn_submit.png"/>
                        </div>
                    </div>
                </div>
                <div class="preorder-done-zone">
                    <img class="img-pop-title img-pop-title-success" src="//cdn.66173.cn/mobile/css/img/yhwz_m/title_preorder_success.png" alt="">
                    <div class="text-zone">
                        <div class="msg-title">哈哈</div>
                        <div class="msg-con">哟哟哟</div>
                        <div class="tip">请在2018年1月20日前到本网站下载游戏兑换</div>
                    </div>
                    <img class="pop-img-gifts" src="//cdn.66173.cn/mobile/css/img/yhwz_m/img_gifts.png" alt="">
                </div>
                <div class="gift-get-zone">
                    <div class="text-zone">
                        <div class="msg-title"></div>
                        <div class="msg-con"></div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<div class="share-mask">
    <div class="item topRight">
        <div class="wx-share-arrow"><img src="http://cdn.66173.cn/mobile/v2/css/img/wx_share_arrow.png" alt=""></div>
        <div class="wx-share-text"><img src="http://cdn.66173.cn/mobile/v2/css/img/wx_share_text.png" alt=""></div>
    </div>
    <div class="item bottomRight" style="font-size:0.5rem;color:red">
        <div class="share-arrow"><img src="http://cdn.66173.cn/mobile/v2/css/img/share_bottom_right.png" alt=""></div>
    </div>
    <div class="item bottomCenter" style="font-size:0.5rem;color:red">
        <div class="share-arrow"><img src="http://cdn.66173.cn/mobile/v2/css/img/share_bottom_center.png" alt=""></div>
    </div>
</div>
<div class="wx-open-other-mask">
    <div class="arrow-wrapper"><img src="http://cdn.66173.cn/mobile/v2/css/img/wx_share_arrow.png" alt=""></div>
    <div class="text-wrapper"><img src="http://cdn.66173.cn/mobile/v2/css/img/wx_open_other_text.png" alt=""></div>
</div>
<div class="loading-mask"><img class="loading-img" src="//cdn.66173.cn/mobile/v2/css/img/loading_grey_bling.gif" alt=""></div>
<div class="brief-tip-pop"><div class="font-md con"></div></div>
<input type="hidden" value="{$noncestr}" id="noncestr"/>
<input type="hidden" value="{$timestamp}" id="timestamp"/>
<input type="hidden" value="{$signature}" id="signature" />
<input type="hidden" id="pagehash" value="{$pagehash}">
<input type="hidden" id="gt" value="{$gt}">
</body>
<script src="http://cdn.66173.cn/mobile/v2/scripts/script.js"></script>
<!--<script src="http://cdn.66173.cn/niuguo/scripts/swiper.jquery.3.4.2.min.js?t={$smarty.now}"></script>-->
<div class="rotator clearfix">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info1.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info2.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info3.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info4.png" alt="" /></a></div>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination">
            <span class="swiper-pagination-bullet swiper-pagination-bullet-active" data-seq="0"></span>
            <span class="swiper-pagination-bullet" data-seq="1"></span>
            <span class="swiper-pagination-bullet" data-seq="2"></span>
            <span class="swiper-pagination-bullet" data-seq="3"></span>
        </div>
    </div>
</div><div class="rotator clearfix">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info1.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info2.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info3.png" alt="" /></a></div>
            <div class="swiper-slide"><a href="#" target="_blank"><img src="http://cdn.66173.cn/mobile/css/img/yhwz_m/img_info4.png" alt="" /></a></div>
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination">
            <span class="swiper-pagination-bullet swiper-pagination-bullet-active" data-seq="0"></span>
            <span class="swiper-pagination-bullet" data-seq="1"></span>
            <span class="swiper-pagination-bullet" data-seq="2"></span>
            <span class="swiper-pagination-bullet" data-seq="3"></span>
        </div>
    </div>
</div>
{literal}
<script>
    var clp;
    var hasPreorder;
    var goPreorderTimeout; //弹窗中预约提交按钮定时
    var regContact = new RegExp(/^1[34578]\d{9}$/);
    var regCaptchaPart = new RegExp(/^[0-9]{6}$/);
    var captchaInterval;//验证倒计时
    var hash = $('#pagehash').val();
    var gt = $("#gt").val();
    var deviceInfo = browserRel && browserRel() || {};
    if(gt == 1) {
        $(".gift-zone").show();
    }
    $(window).load(function() {
        pageBgSize();
        // 轮播区域高度限制
        $(".sec2 .swiper-container").css("height", $(".sec2 .swiper-slide img").height() + 'px');
        loadScript("//cdn.66173.cn/mobile/v2/scripts/clipboard1.6.1.min.js", "clipboardJs");
    });

    // 填好表单后点击预约
    $("body").on("click", ".go-preorder-can", function() {
        $(".go-preorder:visible").removeClass("go-preorder-can");
        btnTimeOutControl(".go-preorder", "go-preorder-can", goPreorderTimeout);
        var resData = checkInput({
            ".tel-input": "mobile",
            ".captcha-input": "sms_code"
        });
        resData.res['pagehash'] = hash;
        // 系统选择： android 或 ios
        resData.res['system'] = $("[name=w]:checked").val();
        if(resData.pass) {
            loadingToggle(true);
            $.ajax({
                url: "/website.php?act=reserve_gift",
                type: "post",
                dataType: "json",
                data: resData.res
            }).success(function(data) {
                loadingToggle(false);
                if(data.code == 1){
                    hasPreorder = true;
                    $(".preorder-done-zone .msg-title").html(data.msg);
                    $(".preorder-done-zone .msg-con").html("预约特权礼包码："+data.gift_code);
                    popControl(".pop-bg-large", ".preorder-done-zone")
                }else{
                    briefTipControl(data.msg);
                }
            }).error(function(res2) {
                loadingToggle(false);
                briefTipControl("请求出错：" + res2.status + "," + res2.statusText);
            })
        }
    });
    // 点击预约按钮跳预约弹窗
    $("body").on("click", ".btn-preorder-entry", function() {
        popControl(".pop-bg-large", ".preorder-form-zone")
    });
    // 获取验证码
    $("body").on("click", ".to-get-captcha", function() {
        if(!regContact.test($(".tel-input:visible").val())) {
            briefTipControl("请填写正确的手机号码！");
            $(".captcha-tip").removeClass("to-get-captcha");
            setTimeout(function() {
                $(".captcha-tip").addClass("to-get-captcha");
            }, 2000);
        }
        else {
            $(".captcha-tip").removeClass("to-get-captcha").html('<span class="count-time">120</span>s后获取');
            var countDownRest = 120;
            clearInterval(captchaInterval);
            captchaInterval = setInterval(function() {
                if(countDownRest > 1){
                    countDownRest--;
                    $(".count-time").html(countDownRest)
                }else{
                    $(".captcha-tip").html("获取验证码").addClass("to-get-captcha");
                    clearInterval(captchaInterval)
                }
            }, 1000);
            var phone = $(".tel-input:visible").val();
            $.ajax({
                url: "/website.php?act=send_code",
                type: "post",
                data: {mobile: phone,pagehash:hash},
                dataType: "json"
            }).success(function(json) {
                briefTipControl(json.msg);
            })
        }
    });
    // 点击取消弹窗
    $("body").on("click", ".close-pop", function() {
        $(".mask").hide();
        if(hasPreorder) {
            window.location.reload();
        }
    });
    // 点击页面上或弹窗内的分享
    $("body").on("click", ".img-share", function() {
        var a = maskPos && maskPos() || {};
        $(".mask").hide();
        $(".share-mask").show();
        if(a.pos) {
            $(".share-mask ." + a.pos).show().siblings().hide();
        } else {
            $(".share-mask .bottomCenter").show().siblings().hide();
        }
//        alert("所在浏览器："+a.browser);

    });
    // 点击引导微信分享图层
    $("body").on("click", ".share-mask", function(e) {
        $(e.currentTarget).hide();
    });
    $("body").on("click", ".article-tabs-zone li", function(e) {
        var $ele =  $(e.target);
        var type = $ele.data("type");
        $ele.addClass("active").siblings().removeClass("active");
        $(".article-entry-cols ." + type).addClass("active").siblings().removeClass("active");
    });
    // 系统选择
    $("body").on("click", ".choose-zone label", function (e) {
        var f = $(e.currentTarget).attr("for");
        $(".choose-zone ." + f + "-line").addClass("active").siblings().removeClass("active");
    });
    if(deviceInfo.os == "iOS" || deviceInfo.os == "Mac") {
        $(".choose-zone label[for=ios]").click();
    } else {
        $(".choose-zone label[for=android]").click();
    }
    // 点击引导其他浏览器打开图层
    $("body").on("click", ".wx-open-other-mask", function(e) {
        $(e.currentTarget).hide();
    });
    $("body").on("click", ".btn-get-gift", function(e) {
        var hasLS = window.localStorage ? true : false;
        var gftmsg = hasLS && window.localStorage.getItem("gftmsg");
        var gftArr = hasLS && window.localStorage.getItem("gftArr") && JSON.parse(window.localStorage.getItem("gftArr"));
        var lastT = hasLS && window.localStorage.getItem("lastT");
        var curT = (new Date()).getTime();
        var type = deviceInfo.os == 'iOS' ? 2 : 1;
        console.log("lastT:"+lastT+",curT:"+curT+",curT-lastT:"+(curT-lastT));
        if(deviceInfo.os == 'Android' && isWeixinBrowser()) {
            e.preventDefault();
            $(".wx-open-other-mask").show();
        } else {
            if (lastT && (curT - lastT) > 5000) {
                getCode(type, true, true);
            } else {
                briefTipControl("下载游戏后才可领取~")
            }
        }

    });
    $("body").on("click", ".download-zone .item", function(e) {
        var ct = true;
        var hasLS = window.localStorage ? true : false;
        var gftmsg = hasLS && window.localStorage.getItem("gftmsg");
        var curT = (new Date()).getTime();
        var link = $(e.currentTarget).attr("href");
        var type = deviceInfo.os == 'iOS' ? 2 : 1;
        if(!link) {
            e.preventDefault();
            var part = $(e.currentTarget).hasClass("android-link") ? "安卓" : "iOS";
            briefTipControl("当前未开放" + part + "用户下载，敬请期待！");
            return false;
        }
        if($(e.currentTarget).hasClass("android-link") && isWeixinBrowser()) {
            e.preventDefault();
            $(".wx-open-other-mask").show();
        } else {
            hasLS && window.localStorage.setItem("lastT", curT);
            getCode(type, false);
        }

    });
    $("body").on("click", ".gift-desc-tab .item", function(e) {
        var $ele = $(e.currentTarget);
        var i = $ele.data("i");
        $ele.addClass("active").siblings().removeClass("active");
        $('.gift-desc-wrapper .item[data-i="' + i + '"]').addClass("active").siblings().removeClass("active");
    });
    function getCode(type, ifRightNow, ifShowLoading) {
        var hasLS = window.localStorage ? true : false;
        ifShowLoading && loadingToggle(true);
        setTimeout(function () {
            $.ajax({
                url: "website.php?act=gift",
                type: "post",
                dataType: "json",
                data: {type: type},
                error: function() {
                    loadingToggle(false);
                },
                success: function (res) {
                    loadingToggle(false);
//                    var res = {
//                        code: 1,
//                        msg: "msg",
//                        giftCode: "www",
//                        giftCode_1: "qqq"
//                    };
                    if (res.code == 1) {
                        hasLS && res.msg && window.localStorage.setItem("gftmsg", res.msg);
                        var codeArr = [];
                        res.giftCode && codeArr.push(res.giftCode);
                        res.giftCode_1 && codeArr.push(res.giftCode_1);
                        var con = "";
                        if(codeArr.length > 0) {
                            hasLS && res.giftCode && window.localStorage.setItem("gftArr", JSON.stringify(codeArr));
                            giftCodeRender(codeArr);
                        }

                    } else {
                        $(".gift-get-zone .msg-con").hide();
                    }
                    $(".gift-get-zone .msg-title").html(res.msg || "");
                    popControl(".pop-bg-large", ".gift-get-zone");
                }
            })
        }, ifRightNow ? 0:2000);

    }
    function giftCodeRender(codeArr) {
        var con = "";
        if(codeArr && codeArr.length > 0) {
            con += '<div class="gift-desc">您的礼包码为：</div>'
            for (var i = 0; i < codeArr.length; i++) {
                var item = codeArr[i];
                con += '<div class="item">'
                    + '<span class="code">' + item + '</span><span class="clp" data-clipboard-text="' + item + '">复制兑换码</span>'
                    + '</div>';
                console.log(item);

            }
            $(".gift-get-zone .msg-con").html(con).show();
            copySet();
        }
    };
    function loadScript(url, id) {
        var hm = document.createElement("script");
        id && (hm.id = id);
        hm.src = url;
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
        return hm;
    }
    function copySet() {
        clp && clp.destroy();
        try {
            clp = new Clipboard(".clp"); //链接复制功能
        } catch(e) {

        }
        if(clp) {
            clp.on('success', function(e) {
                briefTipControl("兑换码: " + e.text + " 已复制");
                e.clearSelection();
            });
            clp.on('error', function(e) {
                briefTipControl("无复制权限，请长按兑换码手动复制");
                e.clearSelection();
            });
        }
    }
</script>
{/literal}
{include file="website/yh/include/footer.html"}
</html>